package cn.tedu.mvc;

import cn.tedu.mvc.entity.User;
import org.junit.jupiter.api.Test;
import org.springframework.web.client.RestTemplate;

public class RestTemplateDemo {
    @Test
    public void putDemo(){
        RestTemplate restTemplate = new RestTemplate();
        String url = "http://localhost:8080/demo/users/3";
        User user = new User(4, "Wang", "12345");
        restTemplate.put(url, user);
        System.out.println("OK");
    }
}
